<!--添加产品分类-->
<div class="dialog_content">
	<form id="info_form" action="{:U('Linkmenu/add')}" method="post">
	<table width="100%" class="table_form">
		<tr> 
			<th width="120">{:L('item_cate_parent')} :</th>
			<td>
				<select class="J_cate_select mr10" data-pid="0" data-menuid="{$menuid}" data-uri="{:U('Linkmenu/ajaxGetchilds')}" data-selected="{$spid}"></select>
				<input type="hidden" name="pid" id="J_cate_id" />
			</td>
		</tr>
		<tr>
			<th>{:L('item_cate_name')} :</th>
			<td>
                <textarea name="name" id="name" style="width:200px;height:30px;"></textarea>
		</tr>

		<tr>
			<th>{:L('cate_alias')} :</th>
			<td>
				<input type="text" name="alias" id="alias" class="input-text" size="20">
				
                <label><input type="radio" name="aliasRadio" value="2" checked="checked"> {:L('alias_all')}</label>&nbsp;&nbsp;
				<label><input type="radio" name="aliasRadio" value="1"> {:L('alias_first')}</label>
			</td>
		</tr>

        <tr>
            <th>{:L('enabled')} :</th>
            <td>
                <label><input type="radio" name="status" value="1" checked="checked"> {:L('yes')}</label>&nbsp;&nbsp;
                <label><input type="radio" name="status" value="0"> {:L('no')}</label>
            </td>
        </tr>

        <tr>
            <th>seo_title :</th>
            <td>
                <input type="text" name="seo_title" class="input-text" size="20"/>
            </td>
        </tr>
        <tr>
            <th>seo_keys :</th>
            <td>
                <input type="text" name="seo_keys" class="input-text" size="20"/>
            </td>
        </tr>
        <tr>
            <th>seo_desc :</th>
            <td>
                <textarea name="seo_desc" id="seo_desc" style="width:200px;height:30px;"></textarea>
            </td>
        </tr>
	</table>
        <input type="hidden" name="menuid" value="{$menuid}" />
	</form>
</div>
<script>
$(function(){
	$.formValidator.initConfig({formid:"info_form",autotip:true});
	$("#name").formValidator({onshow:'输入分类名称',onfocus:'输入分类名称'}).inputValidator({min:1,onerror:'输入分类名称'});
	
	$('#info_form').ajaxForm({success:complate,dataType:'json'});
	function complate(result){
		if(result.status == 1){
			$.dialog.get(result.dialog).close();
			$.pinphp.tip({content:result.msg});
			window.location.reload();
		} else {
			$.pinphp.tip({content:result.msg, icon:'alert'});
		}
	}
	$('.J_cate_select').cate_select();

});
</script>